noexcept operator (C++0x feature)
From Cppreference
Checks whether the evaluation of an expression can throw an exception
Used within noexcept specifier when the fact if the function can throw depends on template parameters.
Contents |
[edit] Syntax
| noexcept( expression )
| |||||||||
Returns an object of type bool.
[edit] Explanation
The noexcept operator does not evaluate expression. The result is true if the expression contains at least one of the following potentially evaluated constructs:
- call to any type of function, which does not have non-throwing exception specification, unless it is a constant expression.
- throw expression
- dynamic_cast expression when the conversion needs a run time check
- typeid expression when argument type is polymorphic class type
On all other cases the result is false
[edit] Keywords
[edit] Example
| This section is incomplete |